<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP, PatternSynonyms, DeriveFunctor #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span class="hs-cpp">

#if !defined(GHC_LOADED_INTO_GHCI)
</span><span class="hs-pragma">{-# LANGUAGE UnboxedTuples #-}</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- | State monad for the linear register allocator.</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-comment">--      Here we keep all the state that the register allocator keeps track</span><span>
</span><span id="line-11"></span><span class="hs-comment">--      of as it walks the instructions in a basic block.</span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.CmmToAsm.Reg.Linear.State</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-14"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RA_State"><span class="hs-identifier">RA_State</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier">RegM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#runR"><span class="hs-identifier">runR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#spillR"><span class="hs-identifier">spillR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#loadR"><span class="hs-identifier">loadR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getFreeRegsR"><span class="hs-identifier">getFreeRegsR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#setFreeRegsR"><span class="hs-identifier">setFreeRegsR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getAssigR"><span class="hs-identifier">getAssigR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#setAssigR"><span class="hs-identifier">setAssigR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getBlockAssigR"><span class="hs-identifier">getBlockAssigR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#setBlockAssigR"><span class="hs-identifier">setBlockAssigR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#setDeltaR"><span class="hs-identifier">setDeltaR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getDeltaR"><span class="hs-identifier">getDeltaR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getUniqueR"><span class="hs-identifier">getUniqueR</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getConfig"><span class="hs-identifier">getConfig</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getPlatform"><span class="hs-identifier">getPlatform</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#recordSpill"><span class="hs-identifier">recordSpill</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#recordFixupBlock"><span class="hs-identifier">recordFixupBlock</span></a></span><span>
</span><span id="line-39"></span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span class="hs-keyword">where</span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Stats.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Linear.Stats</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.StackMap.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Linear.StackMap</span></a></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Linear.Base</span></a></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html"><span class="hs-identifier">GHC.CmmToAsm.Reg.Liveness</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html"><span class="hs-identifier">GHC.CmmToAsm.Instr</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html"><span class="hs-identifier">GHC.CmmToAsm.Config</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html"><span class="hs-identifier">GHC.Platform.Reg</span></a></span><span>
</span><span id="line-51"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html"><span class="hs-identifier">GHC.Cmm.BlockId</span></a></span><span>
</span><span id="line-52"></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html"><span class="hs-identifier">GHC.Types.Unique</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html"><span class="hs-identifier">GHC.Types.Unique.Supply</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier">ap</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-comment">-- Avoids using unboxed tuples when loading into GHCi</span><span class="hs-cpp">
#if !defined(GHC_LOADED_INTO_GHCI)
</span><span>
</span><span id="line-62"></span><span class="hs-keyword">type</span><span> </span><span id="RA_Result"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span></span><span> </span><span id="local-6989586621681023543"><span class="annot"><a href="#local-6989586621681023543"><span class="hs-identifier hs-type">freeRegs</span></a></span></span><span> </span><span id="local-6989586621681023542"><span class="annot"><a href="#local-6989586621681023542"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RA_State"><span class="hs-identifier hs-type">RA_State</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023543"><span class="hs-identifier hs-type">freeRegs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621681023542"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span id="local-6989586621681023674"><span id="local-6989586621681023675"><span class="hs-keyword">pattern</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-type">RA_Result</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621681023675"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681023674"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(#</span><span> </span><span class="annot"><a href="#local-6989586621681023675"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621681023674"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-special">#)</span></span></span><span>
</span><span id="line-65"></span><span class="hs-keyword">pattern</span><span> </span><span id="%24mRA_Result"><span id="%24bRA_Result"><span id="RA_Result"><span class="annot"><span class="annottext">$mRA_Result :: forall {r} {a} {b}.
(# a, b #) -&gt; (a -&gt; b -&gt; r) -&gt; (Void# -&gt; r) -&gt; r
$bRA_Result :: forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#%24mRA_Result"><span class="hs-identifier hs-var hs-var hs-var">RA_Result</span></a></span></span></span></span><span> </span><span class="annot"><a href="#local-6989586621681023538"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023537"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(#</span><span> </span><span id="local-6989586621681023538"><span class="annot"><a href="#local-6989586621681023538"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681023537"><span class="annot"><a href="#local-6989586621681023537"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">#)</span><span>
</span><span id="line-66"></span><span class="hs-pragma">{-# COMPLETE</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-pragma hs-type">RA_Result</span></a></span><span> </span><span class="hs-pragma">#-}</span><span class="hs-cpp">
#else
</span><span>
</span><span id="line-69"></span><span class="hs-keyword">data</span><span> </span><span class="hs-identifier">RA_Result</span><span> </span><span class="hs-identifier">freeRegs</span><span> </span><span class="hs-identifier">a</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-identifier">RA_Result</span><span> </span><span class="hs-pragma">{-# UNPACK</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="hs-identifier">RA_State</span><span> </span><span class="hs-identifier">freeRegs</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">!</span><span class="hs-identifier">a</span><span>
</span><span id="line-70"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span class="hs-identifier">Functor</span><span class="hs-special">)</span><span class="hs-cpp">

#endif
</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- | The register allocator monad type.</span><span>
</span><span id="line-75"></span><span class="hs-keyword">newtype</span><span> </span><span id="RegM"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span></span><span> </span><span id="local-6989586621681023669"><span class="annot"><a href="#local-6989586621681023669"><span class="hs-identifier hs-type">freeRegs</span></a></span></span><span> </span><span id="local-6989586621681023668"><span class="annot"><a href="#local-6989586621681023668"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-76"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="RegM"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span></span><span> </span><span class="hs-special">{</span><span> </span><span id="unReg"><span class="annot"><span class="annottext">forall freeRegs a.
RegM freeRegs a -&gt; RA_State freeRegs -&gt; RA_Result freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#unReg"><span class="hs-identifier hs-var hs-var">unReg</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RA_State"><span class="hs-identifier hs-type">RA_State</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023669"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-type">RA_Result</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023669"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023668"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-77"></span><span>        </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681023531"><span id="local-6989586621681023533"><span class="annot"><span class="annottext">(forall a b. (a -&gt; b) -&gt; RegM freeRegs a -&gt; RegM freeRegs b)
-&gt; (forall a b. a -&gt; RegM freeRegs b -&gt; RegM freeRegs a)
-&gt; Functor (RegM freeRegs)
forall a b. a -&gt; RegM freeRegs b -&gt; RegM freeRegs a
forall a b. (a -&gt; b) -&gt; RegM freeRegs a -&gt; RegM freeRegs b
forall freeRegs a b. a -&gt; RegM freeRegs b -&gt; RegM freeRegs a
forall freeRegs a b. (a -&gt; b) -&gt; RegM freeRegs a -&gt; RegM freeRegs b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; RegM freeRegs b -&gt; RegM freeRegs a
$c&lt;$ :: forall freeRegs a b. a -&gt; RegM freeRegs b -&gt; RegM freeRegs a
fmap :: forall a b. (a -&gt; b) -&gt; RegM freeRegs a -&gt; RegM freeRegs b
$cfmap :: forall freeRegs a b. (a -&gt; b) -&gt; RegM freeRegs a -&gt; RegM freeRegs b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span id="local-6989586621681023646"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681023519"><span id="local-6989586621681023521"><span id="local-6989586621681023523"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023646"><span class="hs-identifier hs-type">freeRegs</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-80"></span><span>      </span><span id="local-6989586621681023517"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; RegM freeRegs a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621681023516"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681023516"><span class="hs-identifier hs-var">a</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a)
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681023515"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023515"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; a -&gt; RA_Result freeRegs a
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023515"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681023516"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-81"></span><span>      </span><span id="local-6989586621681023513"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b.
RegM freeRegs (a -&gt; b) -&gt; RegM freeRegs a -&gt; RegM freeRegs b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">(&lt;*&gt;)</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegM freeRegs (a -&gt; b) -&gt; RegM freeRegs a -&gt; RegM freeRegs b
forall (m :: * -&gt; *) a b. Monad m =&gt; m (a -&gt; b) -&gt; m a -&gt; m b
</span><a href="../../base/src/GHC.Base.html#ap"><span class="hs-identifier hs-var">ap</span></a></span></span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span id="local-6989586621681023641"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681023506"><span id="local-6989586621681023508"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023641"><span class="hs-identifier hs-type">freeRegs</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-84"></span><span>  </span><span id="local-6989586621681023504"><span class="annot"><span class="annottext">RegM freeRegs a
</span><a href="#local-6989586621681023504"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span id="local-6989586621681023503"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b.
RegM freeRegs a -&gt; (a -&gt; RegM freeRegs b) -&gt; RegM freeRegs b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621681023502"><span class="annot"><span class="annottext">a -&gt; RegM freeRegs b
</span><a href="#local-6989586621681023502"><span class="hs-identifier hs-var">k</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs b) -&gt; RegM freeRegs b
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs b) -&gt; RegM freeRegs b)
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs b) -&gt; RegM freeRegs b
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681023501"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023501"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RegM freeRegs a -&gt; RA_State freeRegs -&gt; RA_Result freeRegs a
forall freeRegs a.
RegM freeRegs a -&gt; RA_State freeRegs -&gt; RA_Result freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#unReg"><span class="hs-identifier hs-var hs-var">unReg</span></a></span><span> </span><span class="annot"><span class="annottext">RegM freeRegs a
</span><a href="#local-6989586621681023504"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023501"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-keyword">of</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-type">RA_Result</span></a></span><span> </span><span id="local-6989586621681023500"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023500"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621681023499"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681023499"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegM freeRegs b -&gt; RA_State freeRegs -&gt; RA_Result freeRegs b
forall freeRegs a.
RegM freeRegs a -&gt; RA_State freeRegs -&gt; RA_Result freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#unReg"><span class="hs-identifier hs-var hs-var">unReg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; RegM freeRegs b
</span><a href="#local-6989586621681023502"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681023499"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023500"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">}</span></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span class="hs-comment">-- | Get native code generator configuration</span><span>
</span><span id="line-87"></span><span id="local-6989586621681023627"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getConfig"><span class="hs-identifier hs-type">getConfig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023627"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span></span><span>
</span><span id="line-88"></span><span id="getConfig"><span class="annot"><span class="annottext">getConfig :: forall a. RegM a NCGConfig
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#getConfig"><span class="hs-identifier hs-var hs-var">getConfig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State a -&gt; RA_Result a NCGConfig) -&gt; RegM a NCGConfig
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State a -&gt; RA_Result a NCGConfig) -&gt; RegM a NCGConfig)
-&gt; (RA_State a -&gt; RA_Result a NCGConfig) -&gt; RegM a NCGConfig
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681023498"><span class="annot"><span class="annottext">RA_State a
</span><a href="#local-6989586621681023498"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RA_State a -&gt; NCGConfig -&gt; RA_Result a NCGConfig
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State a
</span><a href="#local-6989586621681023498"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State a -&gt; NCGConfig
forall freeRegs. RA_State freeRegs -&gt; NCGConfig
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_config"><span class="hs-identifier hs-var hs-var">ra_config</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State a
</span><a href="#local-6989586621681023498"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-comment">-- | Get target platform from native code generator configuration</span><span>
</span><span id="line-91"></span><span id="local-6989586621681023623"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getPlatform"><span class="hs-identifier hs-type">getPlatform</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023623"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span></span><span>
</span><span id="line-92"></span><span id="getPlatform"><span class="annot"><span class="annottext">getPlatform :: forall a. RegM a Platform
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#getPlatform"><span class="hs-identifier hs-var hs-var">getPlatform</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Platform
</span><a href="GHC.CmmToAsm.Config.html#ncgPlatform"><span class="hs-identifier hs-var hs-var">ncgPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">(NCGConfig -&gt; Platform) -&gt; RegM a NCGConfig -&gt; RegM a Platform
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">RegM a NCGConfig
forall a. RegM a NCGConfig
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#getConfig"><span class="hs-identifier hs-var">getConfig</span></a></span><span>
</span><span id="line-93"></span><span>
</span><span id="line-94"></span><span class="hs-comment">-- | Run a computation in the RegM register allocator monad.</span><span>
</span><span id="line-95"></span><span id="local-6989586621681023611"><span id="local-6989586621681023617"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#runR"><span class="hs-identifier hs-type">runR</span></a></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span>
</span><span id="line-96"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#BlockAssignment"><span class="hs-identifier hs-type">BlockAssignment</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023617"><span class="hs-identifier hs-type">freeRegs</span></a></span><span>
</span><span id="line-97"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681023617"><span class="hs-identifier hs-type">freeRegs</span></a></span><span>
</span><span id="line-98"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegMap"><span class="hs-identifier hs-type">RegMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#Loc"><span class="hs-identifier hs-type">Loc</span></a></span><span>
</span><span id="line-99"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.StackMap.html#StackMap"><span class="hs-identifier hs-type">StackMap</span></a></span><span>
</span><span id="line-100"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSupply"><span class="hs-identifier hs-type">UniqSupply</span></a></span><span>
</span><span id="line-101"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023617"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023611"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-102"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#BlockAssignment"><span class="hs-identifier hs-type">BlockAssignment</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023617"><span class="hs-identifier hs-type">freeRegs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.StackMap.html#StackMap"><span class="hs-identifier hs-type">StackMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RegAllocStats"><span class="hs-identifier hs-type">RegAllocStats</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="#local-6989586621681023611"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-103"></span><span>
</span><span id="line-104"></span><span id="runR"><span class="annot"><span class="annottext">runR :: forall freeRegs a.
NCGConfig
-&gt; BlockAssignment freeRegs
-&gt; freeRegs
-&gt; RegMap Loc
-&gt; StackMap
-&gt; UniqSupply
-&gt; RegM freeRegs a
-&gt; (BlockAssignment freeRegs, StackMap, RegAllocStats, a)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#runR"><span class="hs-identifier hs-var hs-var">runR</span></a></span></span><span> </span><span id="local-6989586621681023493"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681023493"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span id="local-6989586621681023492"><span class="annot"><span class="annottext">BlockAssignment freeRegs
</span><a href="#local-6989586621681023492"><span class="hs-identifier hs-var">block_assig</span></a></span></span><span> </span><span id="local-6989586621681023491"><span class="annot"><span class="annottext">freeRegs
</span><a href="#local-6989586621681023491"><span class="hs-identifier hs-var">freeregs</span></a></span></span><span> </span><span id="local-6989586621681023490"><span class="annot"><span class="annottext">RegMap Loc
</span><a href="#local-6989586621681023490"><span class="hs-identifier hs-var">assig</span></a></span></span><span> </span><span id="local-6989586621681023489"><span class="annot"><span class="annottext">StackMap
</span><a href="#local-6989586621681023489"><span class="hs-identifier hs-var">stack</span></a></span></span><span> </span><span id="local-6989586621681023488"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681023488"><span class="hs-identifier hs-var">us</span></a></span></span><span> </span><span id="local-6989586621681023487"><span class="annot"><span class="annottext">RegM freeRegs a
</span><a href="#local-6989586621681023487"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-105"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">RegM freeRegs a -&gt; RA_State freeRegs -&gt; RA_Result freeRegs a
forall freeRegs a.
RegM freeRegs a -&gt; RA_State freeRegs -&gt; RA_Result freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#unReg"><span class="hs-identifier hs-var hs-var">unReg</span></a></span><span> </span><span class="annot"><span class="annottext">RegM freeRegs a
</span><a href="#local-6989586621681023487"><span class="hs-identifier hs-var">thing</span></a></span><span>
</span><span id="line-106"></span><span>        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State :: forall freeRegs.
BlockAssignment freeRegs
-&gt; freeRegs
-&gt; RegMap Loc
-&gt; Int
-&gt; StackMap
-&gt; UniqSupply
-&gt; [SpillReason]
-&gt; NCGConfig
-&gt; [(BlockId, BlockId, BlockId)]
-&gt; RA_State freeRegs
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RA_State"><span class="hs-identifier hs-type">RA_State</span></a></span><span>
</span><span id="line-107"></span><span>                </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ra_blockassig :: BlockAssignment freeRegs
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_blockassig"><span class="hs-identifier hs-var">ra_blockassig</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockAssignment freeRegs
</span><a href="#local-6989586621681023492"><span class="hs-identifier hs-var">block_assig</span></a></span><span>
</span><span id="line-108"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ra_freeregs :: freeRegs
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_freeregs"><span class="hs-identifier hs-var">ra_freeregs</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">freeRegs
</span><a href="#local-6989586621681023491"><span class="hs-identifier hs-var">freeregs</span></a></span><span>
</span><span id="line-109"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ra_assig :: RegMap Loc
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_assig"><span class="hs-identifier hs-var">ra_assig</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegMap Loc
</span><a href="#local-6989586621681023490"><span class="hs-identifier hs-var">assig</span></a></span><span>
</span><span id="line-110"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ra_delta :: Int
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_delta"><span class="hs-identifier hs-var">ra_delta</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-comment">{-???-}</span><span>
</span><span id="line-111"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ra_stack :: StackMap
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_stack"><span class="hs-identifier hs-var">ra_stack</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StackMap
</span><a href="#local-6989586621681023489"><span class="hs-identifier hs-var">stack</span></a></span><span>
</span><span id="line-112"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ra_us :: UniqSupply
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_us"><span class="hs-identifier hs-var">ra_us</span></a></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681023488"><span class="hs-identifier hs-var">us</span></a></span><span>
</span><span id="line-113"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ra_spills :: [SpillReason]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_spills"><span class="hs-identifier hs-var">ra_spills</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-114"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ra_config :: NCGConfig
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_config"><span class="hs-identifier hs-var">ra_config</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681023493"><span class="hs-identifier hs-var">config</span></a></span><span>
</span><span id="line-115"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ra_fixups :: [(BlockId, BlockId, BlockId)]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_fixups"><span class="hs-identifier hs-var">ra_fixups</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-116"></span><span>   </span><span class="hs-keyword">of</span><span>
</span><span id="line-117"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-type">RA_Result</span></a></span><span> </span><span id="local-6989586621681023477"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023477"><span class="hs-identifier hs-var">state</span></a></span></span><span> </span><span id="local-6989586621681023476"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681023476"><span class="hs-identifier hs-var">returned_thing</span></a></span></span><span>
</span><span id="line-118"></span><span>         </span><span class="hs-glyph">-&gt;</span><span>     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; BlockAssignment freeRegs
forall freeRegs. RA_State freeRegs -&gt; BlockAssignment freeRegs
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_blockassig"><span class="hs-identifier hs-var hs-var">ra_blockassig</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023477"><span class="hs-identifier hs-var">state</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; StackMap
forall freeRegs. RA_State freeRegs -&gt; StackMap
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_stack"><span class="hs-identifier hs-var hs-var">ra_stack</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023477"><span class="hs-identifier hs-var">state</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; RegAllocStats
forall freeRegs. RA_State freeRegs -&gt; RegAllocStats
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#makeRAStats"><span class="hs-identifier hs-var">makeRAStats</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023477"><span class="hs-identifier hs-var">state</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681023476"><span class="hs-identifier hs-var">returned_thing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span class="hs-comment">-- | Make register allocator stats from its final state.</span><span>
</span><span id="line-122"></span><span id="local-6989586621681023604"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#makeRAStats"><span class="hs-identifier hs-type">makeRAStats</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RA_State"><span class="hs-identifier hs-type">RA_State</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023604"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RegAllocStats"><span class="hs-identifier hs-type">RegAllocStats</span></a></span></span><span>
</span><span id="line-123"></span><span id="makeRAStats"><span class="annot"><span class="annottext">makeRAStats :: forall freeRegs. RA_State freeRegs -&gt; RegAllocStats
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#makeRAStats"><span class="hs-identifier hs-var hs-var">makeRAStats</span></a></span></span><span> </span><span id="local-6989586621681023474"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023474"><span class="hs-identifier hs-var">state</span></a></span></span><span>
</span><span id="line-124"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegAllocStats :: UniqFM Unique [Int]
-&gt; [(BlockId, BlockId, BlockId)] -&gt; RegAllocStats
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RegAllocStats"><span class="hs-identifier hs-type">RegAllocStats</span></a></span><span>
</span><span id="line-125"></span><span>        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ra_spillInstrs :: UniqFM Unique [Int]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_spillInstrs"><span class="hs-identifier hs-var">ra_spillInstrs</span></a></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SpillReason] -&gt; UniqFM Unique [Int]
</span><a href="GHC.CmmToAsm.Reg.Linear.Stats.html#binSpillReasons"><span class="hs-identifier hs-var">binSpillReasons</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; [SpillReason]
forall freeRegs. RA_State freeRegs -&gt; [SpillReason]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_spills"><span class="hs-identifier hs-var hs-var">ra_spills</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023474"><span class="hs-identifier hs-var">state</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-126"></span><span>        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ra_fixupList :: [(BlockId, BlockId, BlockId)]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_fixupList"><span class="hs-identifier hs-var">ra_fixupList</span></a></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; [(BlockId, BlockId, BlockId)]
forall freeRegs. RA_State freeRegs -&gt; [(BlockId, BlockId, BlockId)]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_fixups"><span class="hs-identifier hs-var hs-var">ra_fixups</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023474"><span class="hs-identifier hs-var">state</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span id="local-6989586621681023597"><span id="local-6989586621681023600"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#spillR"><span class="hs-identifier hs-type">spillR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023600"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-130"></span><span>       </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023597"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681023600"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-131"></span><span>
</span><span id="line-132"></span><span id="spillR"><span class="annot"><span class="annottext">spillR :: forall instr freeRegs.
Instruction instr =&gt;
Reg -&gt; Unique -&gt; RegM freeRegs (instr, Int)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#spillR"><span class="hs-identifier hs-var hs-var">spillR</span></a></span></span><span> </span><span id="local-6989586621681023468"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681023468"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681023467"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681023467"><span class="hs-identifier hs-var">temp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs (instr, Int))
-&gt; RegM freeRegs (instr, Int)
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs (instr, Int))
 -&gt; RegM freeRegs (instr, Int))
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs (instr, Int))
-&gt; RegM freeRegs (instr, Int)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681023466"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023466"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-133"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681023465"><span class="annot"><span class="annottext">StackMap
</span><a href="#local-6989586621681023465"><span class="hs-identifier hs-var">stack1</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681023464"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681023464"><span class="hs-identifier hs-var">slot</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StackMap -&gt; Unique -&gt; (StackMap, Int)
</span><a href="GHC.CmmToAsm.Reg.Linear.StackMap.html#getStackSlotFor"><span class="hs-identifier hs-var">getStackSlotFor</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; StackMap
forall freeRegs. RA_State freeRegs -&gt; StackMap
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_stack"><span class="hs-identifier hs-var hs-var">ra_stack</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023466"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681023467"><span class="hs-identifier hs-var">temp</span></a></span><span>
</span><span id="line-134"></span><span>      </span><span id="local-6989586621681023461"><span class="annot"><span class="annottext">instr :: instr
</span><a href="#local-6989586621681023461"><span class="hs-identifier hs-var hs-var">instr</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; instr
forall instr.
Instruction instr =&gt;
NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; instr
</span><a href="GHC.CmmToAsm.Instr.html#mkSpillInstr"><span class="hs-identifier hs-var">mkSpillInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; NCGConfig
forall freeRegs. RA_State freeRegs -&gt; NCGConfig
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_config"><span class="hs-identifier hs-var hs-var">ra_config</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023466"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681023468"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; Int
forall freeRegs. RA_State freeRegs -&gt; Int
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_delta"><span class="hs-identifier hs-var hs-var">ra_delta</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023466"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681023464"><span class="hs-identifier hs-var">slot</span></a></span><span>
</span><span id="line-135"></span><span>  </span><span class="hs-keyword">in</span><span>
</span><span id="line-136"></span><span>  </span><span class="annot"><span class="annottext">RA_State freeRegs
-&gt; (instr, Int) -&gt; RA_Result freeRegs (instr, Int)
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023466"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ra_stack :: StackMap
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_stack"><span class="hs-identifier hs-var">ra_stack</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">StackMap
</span><a href="#local-6989586621681023465"><span class="hs-identifier hs-var">stack1</span></a></span><span class="hs-special">}</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681023461"><span class="hs-identifier hs-var">instr</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681023464"><span class="hs-identifier hs-var">slot</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-137"></span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span id="local-6989586621681023592"><span id="local-6989586621681023593"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#loadR"><span class="hs-identifier hs-type">loadR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023593"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-140"></span><span>      </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023592"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023593"><span class="hs-identifier hs-type">instr</span></a></span></span></span><span>
</span><span id="line-141"></span><span>
</span><span id="line-142"></span><span id="loadR"><span class="annot"><span class="annottext">loadR :: forall instr freeRegs.
Instruction instr =&gt;
Reg -&gt; Int -&gt; RegM freeRegs instr
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#loadR"><span class="hs-identifier hs-var hs-var">loadR</span></a></span></span><span> </span><span id="local-6989586621681023457"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681023457"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681023456"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681023456"><span class="hs-identifier hs-var">slot</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs instr)
-&gt; RegM freeRegs instr
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs instr)
 -&gt; RegM freeRegs instr)
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs instr)
-&gt; RegM freeRegs instr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681023455"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023455"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-143"></span><span>  </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; instr -&gt; RA_Result freeRegs instr
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023455"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; instr
forall instr.
Instruction instr =&gt;
NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; instr
</span><a href="GHC.CmmToAsm.Instr.html#mkLoadInstr"><span class="hs-identifier hs-var">mkLoadInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; NCGConfig
forall freeRegs. RA_State freeRegs -&gt; NCGConfig
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_config"><span class="hs-identifier hs-var hs-var">ra_config</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023455"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681023457"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; Int
forall freeRegs. RA_State freeRegs -&gt; Int
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_delta"><span class="hs-identifier hs-var hs-var">ra_delta</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023455"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681023456"><span class="hs-identifier hs-var">slot</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-144"></span><span>
</span><span id="line-145"></span><span id="local-6989586621681023589"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getFreeRegsR"><span class="hs-identifier hs-type">getFreeRegsR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023589"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023589"><span class="hs-identifier hs-type">freeRegs</span></a></span></span><span>
</span><span id="line-146"></span><span id="getFreeRegsR"><span class="annot"><span class="annottext">getFreeRegsR :: forall freeRegs. RegM freeRegs freeRegs
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#getFreeRegsR"><span class="hs-identifier hs-var hs-var">getFreeRegsR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs freeRegs)
-&gt; RegM freeRegs freeRegs
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs freeRegs)
 -&gt; RegM freeRegs freeRegs)
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs freeRegs)
-&gt; RegM freeRegs freeRegs
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681023453"><span class="annot"><span class="annottext">s :: RA_State freeRegs
</span><a href="#local-6989586621681023453"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RA_State"><span class="hs-identifier hs-type">RA_State</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ra_freeregs :: forall freeRegs. RA_State freeRegs -&gt; freeRegs
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_freeregs"><span class="hs-identifier hs-var">ra_freeregs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681023452"><span class="annot"><span class="annottext">freeRegs
</span><a href="#local-6989586621681023452"><span class="hs-identifier hs-var">freeregs</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-147"></span><span>  </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; freeRegs -&gt; RA_Result freeRegs freeRegs
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023453"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">freeRegs
</span><a href="#local-6989586621681023452"><span class="hs-identifier hs-var">freeregs</span></a></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span id="local-6989586621681023587"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#setFreeRegsR"><span class="hs-identifier hs-type">setFreeRegsR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621681023587"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023587"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-150"></span><span id="setFreeRegsR"><span class="annot"><span class="annottext">setFreeRegsR :: forall freeRegs. freeRegs -&gt; RegM freeRegs ()
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#setFreeRegsR"><span class="hs-identifier hs-var hs-var">setFreeRegsR</span></a></span></span><span> </span><span id="local-6989586621681023451"><span class="annot"><span class="annottext">freeRegs
</span><a href="#local-6989586621681023451"><span class="hs-identifier hs-var">regs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ())
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681023450"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023450"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-151"></span><span>  </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; () -&gt; RA_Result freeRegs ()
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023450"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ra_freeregs :: freeRegs
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_freeregs"><span class="hs-identifier hs-var">ra_freeregs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">freeRegs
</span><a href="#local-6989586621681023451"><span class="hs-identifier hs-var">regs</span></a></span><span class="hs-special">}</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span>
</span><span id="line-153"></span><span id="local-6989586621681023585"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getAssigR"><span class="hs-identifier hs-type">getAssigR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023585"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegMap"><span class="hs-identifier hs-type">RegMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#Loc"><span class="hs-identifier hs-type">Loc</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-154"></span><span id="getAssigR"><span class="annot"><span class="annottext">getAssigR :: forall freeRegs. RegM freeRegs (RegMap Loc)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#getAssigR"><span class="hs-identifier hs-var hs-var">getAssigR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs (RegMap Loc))
-&gt; RegM freeRegs (RegMap Loc)
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs (RegMap Loc))
 -&gt; RegM freeRegs (RegMap Loc))
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs (RegMap Loc))
-&gt; RegM freeRegs (RegMap Loc)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681023449"><span class="annot"><span class="annottext">s :: RA_State freeRegs
</span><a href="#local-6989586621681023449"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RA_State"><span class="hs-identifier hs-type">RA_State</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ra_assig :: forall freeRegs. RA_State freeRegs -&gt; RegMap Loc
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_assig"><span class="hs-identifier hs-var">ra_assig</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681023448"><span class="annot"><span class="annottext">RegMap Loc
</span><a href="#local-6989586621681023448"><span class="hs-identifier hs-var">assig</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-155"></span><span>  </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; RegMap Loc -&gt; RA_Result freeRegs (RegMap Loc)
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023449"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">RegMap Loc
</span><a href="#local-6989586621681023448"><span class="hs-identifier hs-var">assig</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span id="local-6989586621681023583"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#setAssigR"><span class="hs-identifier hs-type">setAssigR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegMap"><span class="hs-identifier hs-type">RegMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#Loc"><span class="hs-identifier hs-type">Loc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023583"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-158"></span><span id="setAssigR"><span class="annot"><span class="annottext">setAssigR :: forall freeRegs. RegMap Loc -&gt; RegM freeRegs ()
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#setAssigR"><span class="hs-identifier hs-var hs-var">setAssigR</span></a></span></span><span> </span><span id="local-6989586621681023447"><span class="annot"><span class="annottext">RegMap Loc
</span><a href="#local-6989586621681023447"><span class="hs-identifier hs-var">assig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ())
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681023446"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023446"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-159"></span><span>  </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; () -&gt; RA_Result freeRegs ()
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023446"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ra_assig :: RegMap Loc
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_assig"><span class="hs-identifier hs-var">ra_assig</span></a></span><span class="hs-glyph">=</span><span class="annot"><span class="annottext">RegMap Loc
</span><a href="#local-6989586621681023447"><span class="hs-identifier hs-var">assig</span></a></span><span class="hs-special">}</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-160"></span><span>
</span><span id="line-161"></span><span id="local-6989586621681023581"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getBlockAssigR"><span class="hs-identifier hs-type">getBlockAssigR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023581"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#BlockAssignment"><span class="hs-identifier hs-type">BlockAssignment</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023581"><span class="hs-identifier hs-type">freeRegs</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-162"></span><span id="getBlockAssigR"><span class="annot"><span class="annottext">getBlockAssigR :: forall freeRegs. RegM freeRegs (BlockAssignment freeRegs)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#getBlockAssigR"><span class="hs-identifier hs-var hs-var">getBlockAssigR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs
 -&gt; RA_Result freeRegs (BlockAssignment freeRegs))
-&gt; RegM freeRegs (BlockAssignment freeRegs)
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs
  -&gt; RA_Result freeRegs (BlockAssignment freeRegs))
 -&gt; RegM freeRegs (BlockAssignment freeRegs))
-&gt; (RA_State freeRegs
    -&gt; RA_Result freeRegs (BlockAssignment freeRegs))
-&gt; RegM freeRegs (BlockAssignment freeRegs)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681023445"><span class="annot"><span class="annottext">s :: RA_State freeRegs
</span><a href="#local-6989586621681023445"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#RA_State"><span class="hs-identifier hs-type">RA_State</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ra_blockassig :: forall freeRegs. RA_State freeRegs -&gt; BlockAssignment freeRegs
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_blockassig"><span class="hs-identifier hs-var">ra_blockassig</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621681023444"><span class="annot"><span class="annottext">BlockAssignment freeRegs
</span><a href="#local-6989586621681023444"><span class="hs-identifier hs-var">assig</span></a></span></span><span class="hs-special">}</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-163"></span><span>  </span><span class="annot"><span class="annottext">RA_State freeRegs
-&gt; BlockAssignment freeRegs
-&gt; RA_Result freeRegs (BlockAssignment freeRegs)
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023445"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">BlockAssignment freeRegs
</span><a href="#local-6989586621681023444"><span class="hs-identifier hs-var">assig</span></a></span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span id="local-6989586621681023579"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#setBlockAssigR"><span class="hs-identifier hs-type">setBlockAssigR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#BlockAssignment"><span class="hs-identifier hs-type">BlockAssignment</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023579"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023579"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-166"></span><span id="setBlockAssigR"><span class="annot"><span class="annottext">setBlockAssigR :: forall freeRegs. BlockAssignment freeRegs -&gt; RegM freeRegs ()
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#setBlockAssigR"><span class="hs-identifier hs-var hs-var">setBlockAssigR</span></a></span></span><span> </span><span id="local-6989586621681023443"><span class="annot"><span class="annottext">BlockAssignment freeRegs
</span><a href="#local-6989586621681023443"><span class="hs-identifier hs-var">assig</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ())
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681023442"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023442"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-167"></span><span>  </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; () -&gt; RA_Result freeRegs ()
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023442"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ra_blockassig :: BlockAssignment freeRegs
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_blockassig"><span class="hs-identifier hs-var">ra_blockassig</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockAssignment freeRegs
</span><a href="#local-6989586621681023443"><span class="hs-identifier hs-var">assig</span></a></span><span class="hs-special">}</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span id="local-6989586621681023577"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#setDeltaR"><span class="hs-identifier hs-type">setDeltaR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023577"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-170"></span><span id="setDeltaR"><span class="annot"><span class="annottext">setDeltaR :: forall freeRegs. Int -&gt; RegM freeRegs ()
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#setDeltaR"><span class="hs-identifier hs-var hs-var">setDeltaR</span></a></span></span><span> </span><span id="local-6989586621681023441"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681023441"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ())
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span> </span><span id="local-6989586621681023440"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023440"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-171"></span><span>  </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; () -&gt; RA_Result freeRegs ()
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023440"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ra_delta :: Int
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_delta"><span class="hs-identifier hs-var">ra_delta</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681023441"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">}</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-172"></span><span>
</span><span id="line-173"></span><span id="local-6989586621681023575"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getDeltaR"><span class="hs-identifier hs-type">getDeltaR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023575"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span></span><span>
</span><span id="line-174"></span><span id="getDeltaR"><span class="annot"><span class="annottext">getDeltaR :: forall freeRegs. RegM freeRegs Int
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#getDeltaR"><span class="hs-identifier hs-var hs-var">getDeltaR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs Int) -&gt; RegM freeRegs Int
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs Int)
 -&gt; RegM freeRegs Int)
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs Int)
-&gt; RegM freeRegs Int
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681023439"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023439"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; Int -&gt; RA_Result freeRegs Int
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023439"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; Int
forall freeRegs. RA_State freeRegs -&gt; Int
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_delta"><span class="hs-identifier hs-var hs-var">ra_delta</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023439"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-175"></span><span>
</span><span id="line-176"></span><span id="local-6989586621681023573"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#getUniqueR"><span class="hs-identifier hs-type">getUniqueR</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023573"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="annot"><a href="GHC.Types.Unique.html#Unique"><span class="hs-identifier hs-type">Unique</span></a></span></span><span>
</span><span id="line-177"></span><span id="getUniqueR"><span class="annot"><span class="annottext">getUniqueR :: forall freeRegs. RegM freeRegs Unique
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#getUniqueR"><span class="hs-identifier hs-var hs-var">getUniqueR</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs Unique)
-&gt; RegM freeRegs Unique
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs Unique)
 -&gt; RegM freeRegs Unique)
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs Unique)
-&gt; RegM freeRegs Unique
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681023438"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023438"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-178"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">UniqSupply -&gt; (Unique, UniqSupply)
</span><a href="GHC.Types.Unique.Supply.html#takeUniqFromSupply"><span class="hs-identifier hs-var">takeUniqFromSupply</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; UniqSupply
forall freeRegs. RA_State freeRegs -&gt; UniqSupply
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_us"><span class="hs-identifier hs-var hs-var">ra_us</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023438"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-179"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621681023436"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681023436"><span class="hs-identifier hs-var">uniq</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681023435"><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681023435"><span class="hs-identifier hs-var">us</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; Unique -&gt; RA_Result freeRegs Unique
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023438"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">{</span><span class="annot"><span class="annottext">ra_us :: UniqSupply
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_us"><span class="hs-identifier hs-var">ra_us</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSupply
</span><a href="#local-6989586621681023435"><span class="hs-identifier hs-var">us</span></a></span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681023436"><span class="hs-identifier hs-var">uniq</span></a></span><span>
</span><span id="line-180"></span><span>
</span><span id="line-181"></span><span>
</span><span id="line-182"></span><span class="hs-comment">-- | Record that a spill instruction was inserted, for profiling.</span><span>
</span><span id="line-183"></span><span id="local-6989586621681023571"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#recordSpill"><span class="hs-identifier hs-type">recordSpill</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.Base.html#SpillReason"><span class="hs-identifier hs-type">SpillReason</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023571"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-184"></span><span id="recordSpill"><span class="annot"><span class="annottext">recordSpill :: forall freeRegs. SpillReason -&gt; RegM freeRegs ()
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#recordSpill"><span class="hs-identifier hs-var hs-var">recordSpill</span></a></span></span><span> </span><span id="local-6989586621681023434"><span class="annot"><span class="annottext">SpillReason
</span><a href="#local-6989586621681023434"><span class="hs-identifier hs-var">spill</span></a></span></span><span>
</span><span id="line-185"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ())
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681023433"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023433"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; () -&gt; RA_Result freeRegs ()
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023433"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ra_spills :: [SpillReason]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_spills"><span class="hs-identifier hs-var">ra_spills</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SpillReason
</span><a href="#local-6989586621681023434"><span class="hs-identifier hs-var">spill</span></a></span><span> </span><span class="annot"><span class="annottext">SpillReason -&gt; [SpillReason] -&gt; [SpillReason]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; [SpillReason]
forall freeRegs. RA_State freeRegs -&gt; [SpillReason]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_spills"><span class="hs-identifier hs-var hs-var">ra_spills</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023433"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>
</span><span id="line-187"></span><span class="hs-comment">-- | Record a created fixup block</span><span>
</span><span id="line-188"></span><span id="local-6989586621681023569"><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#recordFixupBlock"><span class="hs-identifier hs-type">recordFixupBlock</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-type">RegM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681023569"><span class="hs-identifier hs-type">freeRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-189"></span><span id="recordFixupBlock"><span class="annot"><span class="annottext">recordFixupBlock :: forall freeRegs. BlockId -&gt; BlockId -&gt; BlockId -&gt; RegM freeRegs ()
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#recordFixupBlock"><span class="hs-identifier hs-var hs-var">recordFixupBlock</span></a></span></span><span> </span><span id="local-6989586621681023432"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681023432"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621681023431"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681023431"><span class="hs-identifier hs-var">between</span></a></span></span><span> </span><span id="local-6989586621681023430"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681023430"><span class="hs-identifier hs-var">to</span></a></span></span><span>
</span><span id="line-190"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall freeRegs a.
(RA_State freeRegs -&gt; RA_Result freeRegs a) -&gt; RegM freeRegs a
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RegM"><span class="hs-identifier hs-var">RegM</span></a></span><span> </span><span class="annot"><span class="annottext">((RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ())
-&gt; (RA_State freeRegs -&gt; RA_Result freeRegs ()) -&gt; RegM freeRegs ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681023429"><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023429"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; () -&gt; RA_Result freeRegs ()
forall a b. a -&gt; b -&gt; (# a, b #)
</span><a href="GHC.CmmToAsm.Reg.Linear.State.html#RA_Result"><span class="hs-identifier hs-var">RA_Result</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023429"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ra_fixups :: [(BlockId, BlockId, BlockId)]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_fixups"><span class="hs-identifier hs-var">ra_fixups</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681023432"><span class="hs-identifier hs-var">from</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681023431"><span class="hs-identifier hs-var">between</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681023430"><span class="hs-identifier hs-var">to</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(BlockId, BlockId, BlockId)
-&gt; [(BlockId, BlockId, BlockId)] -&gt; [(BlockId, BlockId, BlockId)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs -&gt; [(BlockId, BlockId, BlockId)]
forall freeRegs. RA_State freeRegs -&gt; [(BlockId, BlockId, BlockId)]
</span><a href="GHC.CmmToAsm.Reg.Linear.Base.html#ra_fixups"><span class="hs-identifier hs-var hs-var">ra_fixups</span></a></span><span> </span><span class="annot"><span class="annottext">RA_State freeRegs
</span><a href="#local-6989586621681023429"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-191"></span></pre></body></html>